package com.aaa.controller;

import com.aaa.dao.PublisherMapper;
import com.wsc.entity.Publisher;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("publisher")
public class PublisherController {
    @Resource
    PublisherMapper publisherService;
    @RequestMapping("select")
    public Object select(){
        return publisherService.selectList(null);
    }
    @RequestMapping("insert")
    public Integer insert(Publisher publisher){
        return publisherService.insert(publisher);
    }
    @RequestMapping("delete")
    public Integer delete(Integer id){
        return publisherService.deleteById(id);
    }
    @RequestMapping("update")
    public Integer update(Publisher publisher){
        return publisherService.updateById(publisher);
    }
}
